<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="__STATIC__/web/js/rem.js"></script>
    <link rel="stylesheet" href="__STATIC__/web/css/public.css">
    <link rel="stylesheet" href="__STATIC__/web/css/rencai_detail.css">
    <script src="__STATIC__/web/js/jquery.js"></script>
    <title>人才详情</title>
</head>

<body>
<div class="header">

    <if condition="$uid eq null">
        <a href="{:url('login/login')}">
            <img class="login-user" src="__STATIC__/web/img/login_user.png" />
        </a>
        <else/>
        <div class="login">
            <a href="{:url('me/me')}">
                <img class="login-user" src="__STATIC__/web/img/login_user.png" />
            </a>
        </div>
    </if>
    <img class="logo" src="__STATIC__/web/img/logo_white.png"/>
</div>
<div class="intro">
    <div class="rencai-name">{$teacher.real_name}</div>
    <img class="rencai-img" src="{$teacher.head_img}"/>
    <if condition="$user neq null">
        <div class="collect" id="collect">
            <if condition="$collection neq null">
                <img id="collect-img" src="__STATIC__/web/img/collect.png"/>
                <span id="collect-text">点击取消收藏</span>
                <else/>
                <img id="collect-img" src="__STATIC__/web/img/collect.png"/>
                <span id="collect-text">点击收藏</span>
            </if>

        </div>
    </if>
    <div class="rencai-info">
        {$teacher.resume|raw}
    </div>
</div>
<footer>
    <div class="bottom-bar">
        <div>Copyright©2019 　山东科技大学</div>
        <div>鲁ICP备09051012号</div>
    </div>
</footer>
<script>
    var isClick = true;
    $('#collect').click(function () {
        if (isClick == true) {
            isClick = false;

            $('#collect-text').text('已收藏');
            $('#collect-img').attr('src', '__STATIC__/web/img/collected.png');

        }
        else if (isClick == false) {
            isClick = true;
            $('#collect-text').text('点击收藏');
            $('#collect-img').attr('src', '__STATIC__/web/img/collect.png');
        }
    })
</script>
</body>

</html>